import Vue from "vue";
import VueRouter from "vue-router";
import UiRouter from "@/views/UiRouter.vue";
import ContactsIndex from "@/views/ContactsIndex.vue";
import AboutIndex from "@/views/AboutIndex.vue";
import AllContacts from "@/views/AllContacts.vue";
import AliceContacts from "@/views/AliceContacts.vue";
import BobContacts from "@/views/BobContacts.vue";
import BobBlog from "@/views/BobBlog.vue";
import BobFax from "@/views/BobFax.vue";
Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: "/", component: UiRouter },
    {
      path: "/contacts",
      component: ContactsIndex,
      children: [
        { path: "all", component: AllContacts },
        { path: "alice", component: AliceContacts },
        {
          path: "bob",
          component: BobContacts,
          children: [
            { path: "blog", component: BobBlog },
            { path: "fax", component: BobFax },
          ],
        },
      ],
    },
    { path: "/about", component: AboutIndex },
  ],
});
export default router;
